<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVchansTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('vchans', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('sp_id')->unsigned()->nullable();
            $table->integer('vchan_id');
            $table->string('title')->nullable();
            $table->string('subtitle')->nullable();
            $table->string('spell')->nullable();
            $table->string('short_desc', 100)->nullable();
            $table->string('long_desc')->nullable();
            $table->integer('page_view')->unsigned()->default(0);
            $table->text('tags')->nullable();
            $table->text('vcposters')->nullable();
            $table->text('vepgs')->nullable();
            $table->text('vcstreams')->nullable();
            $table->text('vlogo')->nullable();
            $table->timestamp('expiring_at')->nullable();
            $table->tinyInteger('async_result')->nullable();
            $table->text('async_content')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('vchans');
    }
}
